From 14fe9c2572ebbaafa8da0b7380c4fea81cef2f51 Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 24 Jul 2004 22:47:29 +0000 Subject: [PATCH] Free GC strings when releasing waypoint. --- waypt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/waypt.c b/waypt.c index f5f2323a8..04acd2ec1 100644 --- a/waypt.c +++ b/waypt.c @@ -243,6 +243,12 @@ waypt_free( waypoint *wpt ) if (wpt->gpx_extras) { free_gpx_extras(wpt->gpx_extras); } + if (wpt->gc_data.desc_short.utfstring) { + xfree(wpt->gc_data.desc_short.utfstring); + } + if (wpt->gc_data.desc_long.utfstring) { + xfree(wpt->gc_data.desc_long.utfstring); + } xfree(wpt); } -- 2.30.2